import cv2
import numpy as np
class Concat():
    """
    """
    def __init__(self, keys, axis):
        self.keys = keys
        self.axis = axis

    def __call__(self, data:dict):
        result = data[self.keys["in"][0]]
        for key in self.keys["in"][1:]:
            for batch_id, boxes in enumerate(data[key]):
                result[batch_id].extend(boxes)
        data[self.keys["out"]] = result
        return data